import 'babel-polyfill';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, Link } from '$router';
import IndexShow from './indexshow'
import yoHistory from '../common/history';

const HomePage = require.async('./home');
const Skill = require.async('./skill');
const Item = require.async('./item')
const Me = require.async('./me')


const Root = () => (
    <Router history={yoHistory}>
        <Route path="/">
            <IndexRoute component={IndexShow}/>
            <Route path="home" getComponent={HomePage} />
            <Route path="skill" getComponent={Skill} />
            <Route path="item" getComponent={Item} />
            <Route path="me" getComponent={Me} />
        </Route>
    </Router>
);

ReactDOM.render(<Root />, document.getElementById('root'));
